Monitoring with near-infrared spectroscopy